package cn.com.smartdevices.bracelet.chart.util;

import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.FontMetricsInt;
import android.text.style.ReplacementSpan;

/* renamed from: cn.com.smartdevices.bracelet.chart.util.s */
public class C0803s extends ReplacementSpan {
    private float f4122a;
    private float f4123b;
    private float f4124c;
    private float f4125d;

    public C0803s(float f, float f2, float f3, float f4) {
        this.f4122a = f;
        this.f4123b = f2;
        this.f4124c = f3;
        this.f4125d = f4;
    }

    public void draw(Canvas canvas, CharSequence charSequence, int i, int i2, float f, int i3, int i4, int i5, Paint paint) {
        canvas.drawText(charSequence.subSequence(i, i2).toString(), (this.f4122a + f) - this.f4124c, (((float) i4) + this.f4123b) - this.f4125d, paint);
    }

    public int getSize(Paint paint, CharSequence charSequence, int i, int i2, FontMetricsInt fontMetricsInt) {
        return (int) paint.measureText(charSequence.subSequence(i, i2).toString());
    }
}
